package io.gitee.xyuesheng.day03;

import org.junit.Test;

public class HomeworkTestBook {
    @Test
    public void test() {
        HomeworkBook book1 = new HomeworkBook("#1", "book1", 100);
        HomeworkBook book2 = new HomeworkBook("#2", "book2", 120);
        HomeworkBook book3 = new HomeworkBook("#3", "book3", 90);
        double p1 = Math.max(book1.getPrice(), book2.getPrice());
        double p2 = Math.max(p1, book3.getPrice());
        if (p2 == book1.getPrice()) {
            System.out.println(book1.toString());
        } else if (p2 == book2.getPrice()) {
            System.out.println(book2.toString());
        } else {
            System.out.println(book3.toString());
        }
    }
}
